<template>
	<view class="content">
		<view class="logo" style="">
			<image src="https://aiinterview-1322700550.cos.ap-shanghai.myqcloud.com/wxminiprograme/logo.png"
				mode="widthFix" style="width: 30px;height: 30px;"></image>
			<view style="font-weight: 500;font-size: 22px;color: #FFFFFF;">
				求职精灵
			</view>
		</view>

		<view class="header">

		</view>
		<view class="foot">

		</view>
		<view class="center">
			<image src="https://aiinterview-1322700550.cos.ap-shanghai.myqcloud.com/wxminiprograme/ai%20%281%29.png"
				mode="widthFix"></image>
			<view class="job">
				<view style="font-weight: bold;font-size: 20px;line-height: 50px;height: 100%;
				display: flex;
				align-items: center;
				flex-direction: column;
				justify-content: center;">
					<view>
						<text style="color: #7349E4;">{{name}}</text>同学，您要面试的是
					</view>
					<view>
						<text style="color: #7349E4;">【{{job}}】</text>岗位
					</view>
					<view style="height: 1px;background: #E8DFFF;border-radius: 1px;width: 100%;">
					</view>
					<view style="font-weight: 400;font-size: 16px;color: #33333D;line-height: 24px;margin-top: 20px;">
						准备好了，请点击【开始面试】
					</view>
				</view>
			</view>
			<view class="textTimes">
				（目前剩余AI智能简历修改次数：<text style="color: #7349E4;">{{number}}</text>次）
			</view>
			<view class="submit" @click="login">
				开始面试
			</view>
		</view>

		<view class="tag">
			<view
				style="background: linear-gradient(90deg, #6400FF 0% , #FF5EFD 100%);display: inline-block; color: transparent; -webkit-background-clip: text; background-clip: text;margin-left: 15px;">
				AI
			</view>
			<view style="  font-weight: 400; font-size: 15px; color: #282828; opacity: 0.8;">
				，让面试胸有成竹
			</view>
		</view>
	</view>
</template>

<script setup>
	
	import {
		onLoad
	} from "@dcloudio/uni-app"
	
	import {
		ref
	} from 'vue';
	const number = ref(uni.getStorageSync('number'))
	const name = ref(uni.getStorageSync('username'))
	const job = ref(uni.getStorageSync('job'))

	import {
		comfirmStart
	} from '../../api/index.js';
if(!number.value){
	number.value = 1
}
	onLoad((e) => {
		if (wx.setScreenBrightness) {
			// 保持屏幕常亮 true / false
			wx.setKeepScreenOn({
				keepScreenOn: true
			});
		} else {
			// 如果希望用户在最新版本的客户端上体验您的小程序，可以这样子提示
			wx.showModal({
				title: '提示',
				content: '当前微信版本过低，无法使用该功能，请升级到最新微信版本后重试。'
			})
		}
	})
 

	const login = () => {

		comfirmStart().then(
			uni.navigateTo({
				url: '/pages/recording/recording'
			})
		)


	}
</script>
<style lang="less">
	.content {
		position: relative;
		background: #E4E4FF;
		height: 100vh;
		display: flex;
		flex-direction: column;
		justify-content: space-between;

		.logo {
			position: absolute;
			top: -24%;
			display: flex;
			justify-content: center;
			align-items: center;
		}

		.header {
			background: url(https://aiinterview-1322700550.cos.ap-shanghai.myqcloud.com/wxminiprograme/%E5%9B%BE%E5%B1%82%203%402x.png) no-repeat;
			background-size: cover;
			height: 40%;
		}

		.foot {
			background: url(https://aiinterview-1322700550.cos.ap-shanghai.myqcloud.com/wxminiprograme/%E5%9B%BE%E5%B1%82%205.png) no-repeat;
			background-size: cover;
			height: 40%;
		}

		.tag {
			background: url(https://aiinterview-1322700550.cos.ap-shanghai.myqcloud.com/wxminiprograme/%E5%9C%86%E8%A7%92%E7%9F%A9%E5%BD%A2%206.png) no-repeat;
			position: absolute;
			bottom: 5%;
			width: 44%;
			height: 35px;
			line-height: 28px;
			background-size: cover;
			left: 50%;
			transform: translateX(-50%);
			display: flex;

		}

		.center {
			padding: 30px 10px 20px;
			position: absolute;
			top: 26%;
			min-height: 50%;
			width: 80%;
			left: 50%;
			transform: translateX(-50%);
			background: #FFFFFF;
			box-shadow: 0px 0px 65px 0px rgba(134, 103, 223, 0.29);
			border-radius: 10px;
			border: 4px solid #FFFFFF;
			display: flex;
			flex-direction: column;
			align-items: center;

			image {
				width: 40%;
				position: absolute;
				left: 50%;
				transform: translateX(-50%);
				top: -20%;
			}

			.job {
				margin: 40px 5px 40px 5px;
				padding: 10px;
				width: 90%;
				height: 40%;
				background: rgba(178, 143, 255, 0.1);
				border-radius: 10px;
				border: 1px solid #5125B2;
			}

			.submit {
				width: 100%;
				height: 50px;
				background: #7349E4;
				border-radius: 10px;
				border: 4px solid #FFFFFF;
				text-align: center;
				line-height: 50px;
				font-weight: 500;
				font-size: 20px;
				color: #FFFFFF;
				margin-top: 40px;
			}

			// .line{
			// 	width: 100%;
			// 	text-align: center;
			// }
			// .myinput{

			// }
			// .logo{
			// 	background: url(https://aiinterview-1322700550.cos.ap-shanghai.myqcloud.com/wxminiprograme/ai%20%281%29.png") no-repeat;
			// 	background-size: cover;
			// 	height: 204px;
			// 	width: 193px;
			// }
		}
	}

</style>